package net.lijingye.education.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import net.lijingye.education.entity.Term;

/**
 * Created by LijingYe on 2016/3/26.
 */
public class TermVO {
    @JSONField(name = "id", ordinal = 0, serialzeFeatures = SerializerFeature.WriteMapNullValue)
    private Integer id;
    @JSONField(name = "name", ordinal = 1, serialzeFeatures = SerializerFeature.WriteMapNullValue)
    private String name;

    public TermVO(Term term) {
        this.id = term.getId();
        this.name = term.getName();
    }

    public TermVO(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "TermVO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
